package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Region;
import com.cskaoyan.service.wxService.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("wx/region")
public class WxRegionController {

    @Autowired
    WxRegionService wxRegionService;

    @RequestMapping("list")
    public BaseRespVo getRegionList(Integer pid){
        List<Region> wxRegionList = wxRegionService.getWxRegionList(pid);
        return BaseRespVo.ok(wxRegionList);
    }
}
